<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="JVM,">










<meta name="description" content="运行时数据 堆 JVM中最大内存空间，被所有内存共享，几乎所有对象和数组都分配到堆中 堆被分为老年代和新生代。 永久代 Java6中，在非堆内存中 Java7中，静态变量和运行常量池被合并到堆中 Java8中，被元空间取代    程序计数器 是一块很小的内存空间，主要用来记录各个线程的字节码地址 Java是多线程语言，当执行的线程数量超过CPU数量时，线程之间会根据时间片轮询争夺CPU资源 但一个">
<meta name="keywords" content="JVM">
<meta property="og:type" content="article">
<meta property="og:title" content="Jvm内存模型">
<meta property="og:url" content="http://www.yungyuweb.xyz/blog/2019/10/16/Jvm/index.html">
<meta property="og:site_name" content="YungyuBlog">
<meta property="og:description" content="运行时数据 堆 JVM中最大内存空间，被所有内存共享，几乎所有对象和数组都分配到堆中 堆被分为老年代和新生代。 永久代 Java6中，在非堆内存中 Java7中，静态变量和运行常量池被合并到堆中 Java8中，被元空间取代    程序计数器 是一块很小的内存空间，主要用来记录各个线程的字节码地址 Java是多线程语言，当执行的线程数量超过CPU数量时，线程之间会根据时间片轮询争夺CPU资源 但一个">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://www.yungyuweb.xyz/blog/images/jvm/jvm.png">
<meta property="og:updated_time" content="2020-05-26T01:13:54.284Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Jvm内存模型">
<meta name="twitter:description" content="运行时数据 堆 JVM中最大内存空间，被所有内存共享，几乎所有对象和数组都分配到堆中 堆被分为老年代和新生代。 永久代 Java6中，在非堆内存中 Java7中，静态变量和运行常量池被合并到堆中 Java8中，被元空间取代    程序计数器 是一块很小的内存空间，主要用来记录各个线程的字节码地址 Java是多线程语言，当执行的线程数量超过CPU数量时，线程之间会根据时间片轮询争夺CPU资源 但一个">
<meta name="twitter:image" content="http://www.yungyuweb.xyz/blog/images/jvm/jvm.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://www.yungyuweb.xyz/blog/2019/10/16/Jvm/">





  <title>Jvm内存模型 | YungyuBlog</title>
  








  <style>
    body{
      background: url("/blog/images/bg.jpg");
    }
  </style>
</head>

<!--<script src="https://cdn.bootcss.com/canvas-nest.js/2.0.4/canvas-nest.js"></script>-->

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">YungyuBlog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-game">
          <a href="http://yungyu.gitee.io/canvas-game/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-gamepad"></i> <br>
            
            游戏
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://www.yungyuweb.xyz/blog/blog/2019/10/16/Jvm/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Yungyu">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/blog/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="YungyuBlog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Jvm内存模型</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-10-16T09:54:00+08:00">
                2019-10-16
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/JVM/" itemprop="url" rel="index">
                    <span itemprop="name">JVM</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2019/10/16/Jvm/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count gitment-comments-count" data-xid="/blog/2019/10/16/Jvm/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="运行时数据"><a href="#运行时数据" class="headerlink" title="运行时数据"></a>运行时数据</h1><p><img src="http://www.yungyuweb.xyz/blog/images/jvm/jvm.png" alt="jvm"></p>
<h2 id="堆"><a href="#堆" class="headerlink" title="堆"></a>堆</h2><ol>
<li>JVM中最大内存空间，被所有内存共享，几乎所有对象和数组都分配到堆中</li>
<li>堆被分为老年代和新生代。</li>
<li>永久代<ul>
<li>Java6中，在非堆内存中</li>
<li>Java7中，静态变量和运行常量池被合并到堆中</li>
<li>Java8中，被元空间取代</li>
</ul>
</li>
</ol>
<h2 id="程序计数器"><a href="#程序计数器" class="headerlink" title="程序计数器"></a>程序计数器</h2><ol>
<li>是一块很小的内存空间，主要用来记录各个线程的字节码地址</li>
<li>Java是多线程语言，当执行的线程数量超过CPU数量时，线程之间会根据时间片轮询争夺CPU资源<ul>
<li>但一个线程的时间片用完了，或者其他原因导致线程的CPU资源被提前抢夺</li>
<li>那么退出的线程需要单独的程序计数器来记录下一条运行的指令</li>
</ul>
</li>
</ol>
<h2 id="方法区："><a href="#方法区：" class="headerlink" title="方法区："></a>方法区：</h2><ol>
<li>方法区主要用来存放已被虚拟机加载的类相关信息<ul>
<li>类信息（类的版本、字段、方法、接口和父类等信息）、运行常量池、字符串常量池</li>
</ul>
</li>
<li>JVM在执行某个类的时候，必须经过加载、链接（验证、准备、解析）、初始化<ul>
<li>常量池：用来存放编译生成的各种字面量和符号引用</li>
<li>字面量：字符串、基本类型的常量（final修饰）</li>
<li>符号引用：类和方法的全限定名称、字段的名称和描述符、方法的名称和描述符</li>
</ul>
</li>
<li>运行常量池是全局共享的，多个类公用一个运行时常量池<ul>
<li>class文件中的常量池多个相同的字符串在运行时常量池只会存在一份</li>
</ul>
</li>
<li>方法区和堆类似，都是一个共享内存区，多个类共用一个运行时常量池<ul>
<li>假设两个线程都试图访问方法区中同一个类信息，而这个类还没有装入JVM</li>
<li>那么此时只允许一个线程去加载该类，另一个线程必须等待</li>
</ul>
</li>
<li>JVM的内存模型只是一个规范，方法区也是一个规范，一个逻辑分区，并不是一个物理分区</li>
<li>在Java8中已经用元空间替代永久代实现方法区，并且元空间的存储位置时本地内存</li>
</ol>
<h2 id="虚拟机栈"><a href="#虚拟机栈" class="headerlink" title="虚拟机栈"></a>虚拟机栈</h2><ol>
<li>Java虚拟机栈是一个线程私有的内存空间，和Java线程一起创建</li>
<li>当创建一个线程时，会在虚拟机栈中申请一个线程栈<ul>
<li>用来保存方法的局部变量、操作数帧、动态链接方法和返回地址等信息，并参与方法的调用和返回</li>
</ul>
</li>
<li>每一个方法的调用都伴随着栈帧的入栈操作，每一个方法的返回都伴随着栈帧的出栈操作</li>
</ol>
<h2 id="本地方法栈"><a href="#本地方法栈" class="headerlink" title="本地方法栈"></a>本地方法栈</h2><ol>
<li>本地方法栈跟Java虚拟机栈的功能类似</li>
<li>Java虚拟机栈用来管理Java函数的调用，而本地方法栈用来管理本地方法（C语言实现）的调用</li>
</ol>
<h1 id="JVM运行原理"><a href="#JVM运行原理" class="headerlink" title="JVM运行原理"></a>JVM运行原理</h1><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre></td><td class="code"><pre><span class="line">public class JVMCase &#123;</span><br><span class="line">    // 常量</span><br><span class="line">    private final static String MAN_SEX_TYPE = &quot;man&quot;;</span><br><span class="line">    // 静态变量</span><br><span class="line">    public static String WOMAN_SEX_TYPE = &quot;woman&quot;;</span><br><span class="line"></span><br><span class="line">    public static void main(String[] args) &#123;</span><br><span class="line">        Student student = new Student();</span><br><span class="line">        student.setName(&quot;nick&quot;);</span><br><span class="line">        student.setSexType(MAN_SEX_TYPE);</span><br><span class="line">        student.setAge(20);</span><br><span class="line"></span><br><span class="line">        JVMCase jvmCase = new JVMCase();</span><br><span class="line">        // 调用非静态方法</span><br><span class="line">        jvmCase.sayHello(student);</span><br><span class="line">        // 调用静态方法</span><br><span class="line">        print(student);</span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line">    // 非静态方法</span><br><span class="line">    private void sayHello(Student student) &#123;</span><br><span class="line">        System.out.println(student.getName() + &quot; say: hello&quot;);</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    // 常规静态方法</span><br><span class="line">    private static void print(Student student) &#123;</span><br><span class="line">        System.out.println(student);</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">@Data</span><br><span class="line">class Student &#123;</span><br><span class="line">    private String name;</span><br><span class="line">    private String sexType;</span><br><span class="line">    private int age;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h2 id="JVM向操作系统中申请内存"><a href="#JVM向操作系统中申请内存" class="headerlink" title="JVM向操作系统中申请内存"></a>JVM向操作系统中申请内存</h2><ol>
<li>JVM第一步是通过参数配置或者默认配置参数向操作系统中申请内存空间，根据内存大小找出具体的内存分配表</li>
<li>JVM然后把内存段的起始地址和终止地址分配给JVM，最后JVM进行内部分配</li>
</ol>
<h2 id="JVM获得内存空间后，会根据参数分配堆、栈以及方法区的内存大小"><a href="#JVM获得内存空间后，会根据参数分配堆、栈以及方法区的内存大小" class="headerlink" title="JVM获得内存空间后，会根据参数分配堆、栈以及方法区的内存大小"></a>JVM获得内存空间后，会根据参数分配堆、栈以及方法区的内存大小</h2><h2 id="class文件的加载、验证、准备和解析"><a href="#class文件的加载、验证、准备和解析" class="headerlink" title="class文件的加载、验证、准备和解析"></a>class文件的加载、验证、准备和解析</h2><ol>
<li>其中准备阶段会为类的静态成员（字段和方法）分配内存，初始化为系统初始值</li>
</ol>
<h2 id="初始化"><a href="#初始化" class="headerlink" title="初始化"></a>初始化</h2><ol>
<li>JVM首先会执行构造方法，编译器会在.java文件被编译成.class文件，收集所有类的初始化代码</li>
<li>初始化代码：静态变量赋值语句，静态代码块，静态方法</li>
</ol>
<h2 id="执行方法"><a href="#执行方法" class="headerlink" title="执行方法"></a>执行方法</h2><ol>
<li>启用main线程，执行main方法，执行第一行代码</li>
<li>在堆内存中会创建一个Student对象, 对象引用存放在栈中</li>
<li>再创建一个JVMCase对象，并调用sayHello方法<ul>
<li>sayHello方法属于对象jvmCase, 此时sayHello方法入栈，并调用栈中Student引用调用堆中的Studen对象</li>
</ul>
</li>
<li>调用静态方法print<ul>
<li>print方法属于JVMcase类，从静态方法中获取后放入到栈中，通过Student引用调用堆中的Student对象。</li>
</ul>
</li>
</ol>
<p>引用：<a href="http://zhongmingmao.me/2019/09/07/java-performance-jvm-memory-model/" target="_blank" rel="noopener">Java性能 – JVM内存模型</a></p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/JVM/" rel="tag"># JVM</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2019/09/23/install-fastdfs/" rel="next" title="文件服务器Fastdfs安装">
                <i class="fa fa-chevron-left"></i> 文件服务器Fastdfs安装
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2020/05/26/Flux/" rel="prev" title="FLUX">
                FLUX <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
      
        <div id="gitment-container"></div>
      
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/blog/images/avatar.png" alt="Yungyu">
            
              <p class="site-author-name" itemprop="name">Yungyu</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">9</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">2</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/blog/tags/index.html">
                  <span class="site-state-item-count">2</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/jhx314" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:yungyuchiang94@163.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#运行时数据"><span class="nav-number">1.</span> <span class="nav-text">运行时数据</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#堆"><span class="nav-number">1.1.</span> <span class="nav-text">堆</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#程序计数器"><span class="nav-number">1.2.</span> <span class="nav-text">程序计数器</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#方法区："><span class="nav-number">1.3.</span> <span class="nav-text">方法区：</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#虚拟机栈"><span class="nav-number">1.4.</span> <span class="nav-text">虚拟机栈</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#本地方法栈"><span class="nav-number">1.5.</span> <span class="nav-text">本地方法栈</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#JVM运行原理"><span class="nav-number">2.</span> <span class="nav-text">JVM运行原理</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#JVM向操作系统中申请内存"><span class="nav-number">2.1.</span> <span class="nav-text">JVM向操作系统中申请内存</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#JVM获得内存空间后，会根据参数分配堆、栈以及方法区的内存大小"><span class="nav-number">2.2.</span> <span class="nav-text">JVM获得内存空间后，会根据参数分配堆、栈以及方法区的内存大小</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#class文件的加载、验证、准备和解析"><span class="nav-number">2.3.</span> <span class="nav-text">class文件的加载、验证、准备和解析</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#初始化"><span class="nav-number">2.4.</span> <span class="nav-text">初始化</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#执行方法"><span class="nav-number">2.5.</span> <span class="nav-text">执行方法</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Yungyu</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  


<script>
// 鼠标点击特效
let mouseSum = 0;
jQuery(document).ready(function($) {
    $("body").click(function(e) {
        var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善");
        var $i = $("<span/>").text(a[mouseSum]);
        mouseSum = (mouseSum + 1) % a.length;
        var x = e.pageX,
        y = e.pageY;
        $i.css({
            "z-index": 9999999,
            "top": y - 20,
            "left": x,
            "position": "absolute",
            "font-weight": "bold",
            "color": "#FF4040"
        });
        $("body").append($i);
        $i.animate({
            "top": y - 180,
            "opacity": 0
        },
        1500,
        function() {
            $i.remove();
        });
    });
});
</script>
<!--<script src="/js/floatext.js"></script>-->
<script src="/blog/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/blog/live2dw/assets/assets/shizuku.model.json"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":true},"log":false});</script></body>
</html>
